<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>超级管理员列表</title>
	<style type="text/css">
	<!--
	body {
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
	}
	
	.tabfont01 {
		font-family: "宋体";
		font-size: 9px;
		color: #555555;
		text-decoration: none;
		text-align: center;
	}
	
	.font051 {
		font-family: "宋体";
		font-size: 12px;
		color: #333333;
		text-decoration: none;
		line-height: 20px;
	}
	
	.font201 {
		font-family: "宋体";
		font-size: 12px;
		color: #FF0000;
		text-decoration: none;
	}
	
	.button {
		font-family: "宋体";
		font-size: 14px;
		height: 37px;
	}
	
	html {
		overflow-x: auto;
		overflow-y: auto;
		border: 0;
	}
	-->
	</style>
	<link rel="stylesheet" href="jquery-validation/screen.css" />
	<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
	<script type="text/javascript" src="jquery.validate.min.js"></script>
	<script type="text/javascript" src="WarnMessages.js"></script>
	<link href="css/css.css" rel="stylesheet" type="text/css" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">

//全选
function checkAll(name)
{
  var names=document.getElementsByName(name);
  var len=names.length;
  if(len>0)
  {
   var i=0;
   for(i=0;i<len;i++)
   names[i].checked=true;
    
  }
}

//全不选
function checkAllNo(name)
{
  var names=document.getElementsByName(name);
 var len=names.length;
 if(len>0)
  {
    var i=0;
    for(i=0;i<len;i++)
    names[i].checked=false;
  }
}

//反选
function reserveCheck(name)
{
  var names=document.getElementsByName(name);
 var len=names.length;
 if(len>0)
 {
 var i=0;
   for(i=0;i<len;i++)
   {
     if(names[i].checked)
     names[i].checked=false;
     else
     names[i].checked=true;
   }
 } 
}

function XXX() {
 	document.checkIds.submit();    
} 


</script>

<script type="text/javascript">
$(function(){
	$("#addAdmin").click(function(){
		window.location.href="adminmanage/AdminAdd.jsp";
	});
	
});
 
</script>
</head>
<body>

	<table id="mainpage" width="100%" border="0" cellspacing="0"
		cellpadding="0">
		<tr>
			<td height="30"><table width="100%" border="0" cellspacing="0"
					cellpadding="0">
					<tr>
						<td height="62" background="images/nav04.gif">
							<!-- <span class="newfont07">&nbsp;&nbsp;&nbsp;&nbsp;选择：
								<input type="radio" name="choice" id="ckall" onclick="checkAll('adminIdStr','ckall')" />全选
								<input type="radio"  name="choice" id="ckReserve" onclick="reserveCheck('adminIdStr','ckReserve')" />反选 -->
								<!-- <input name="Submit" type="button" onclick="XXX()" class="right-button08" value="删除" /> 
						    </span> -->&nbsp;&nbsp;&nbsp;&nbsp;
							<a href="admin/adminmanage/AdminAdd.jsp"  target="mainFrame">  <input id="addAdmin" type="button" class="right-button08"  value="添加管理员"/></a> 													
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<table id="subtree1" style="DISPLAY: " width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>
							<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
								<tr>
									<td height="40" class="font42">
									<form action="admin/admindeleteAdmin" name="checkIds">
										<table width="100%" border="0" cellpadding="4" align="center" cellspacing="1" bgcolor="#464646" class="newfont03">
											<tr><td height="20" colspan="4" align="center" bgcolor="#EEEEEE" class="tablestyle_title" >超级管理员列表</td></tr>
											<tr>
												<td width="5%" align="center" bgcolor="#EEEEEE">选择</td>
												<td width="10%" align="center" bgcolor="#EEEEEE">管理员名称</td>
												<td width="5%" align="center" bgcolor="#EEEEEE">类别名称</td>
												<td width="5%" align="center" bgcolor="#EEEEEE">操作</td>
											</tr>
											<c:forEach var="admin" items="${requestScope.pages.records}" >
											<tr align="center">
												<td width="5%" align="center" bgcolor="#EEEEEE">
												<c:if test="${ admin.adminId != sessionScope.admin_id }">
													<input type="checkbox" name="adminIdStr" value="${admin.adminId }"/>
												</c:if>
												<c:if test="${ admin.adminId == sessionScope.admin_id }">
													<input type="checkbox" name="" value="${admin.adminId }" disabled="disabled" />
												</c:if>
												</td>
												<td width="10%" align="center" bgcolor="#EEEEEE"> ${admin.account}</td>
												<td width="10%" align="center" bgcolor="#EEEEEE">
													<c:if test="${admin.roleId == 7}">超级管理员</c:if>
													<c:if test="${admin.roleId == 9}">期刊管理员</c:if>
													<c:if test="${admin.roleId == 8}">用户管理员</c:if> 
												</td>
												<td width="10%" align="center" bgcolor="#EEEEEE">
													<%--<a href="admin/adminresetPwdCommon?adminId=${admin.adminId}">重置密码</a>&nbsp;|--%>
													<a href="admin/permissionListByRole?id=7">权限查看</a>
												</td>
											</tr>
											</c:forEach>
										</table>
										</form>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>
